package com.ag.utils;

import java.math.BigDecimal;

import com.ag.exception.KVException;
import com.ag.utils.vo.KVObj;

/**
 * @author rplees
 * @email rplees.i.ly@gmail.com
 * @version 1.0
 * @created Jul 1, 2021 11:26:24 AM
 */
public final class Utils {
	public static void throwing(KVObj kvObj) {
		if (kvObj == null)
			return;

		_throwing(kvObj.getKey(), kvObj.getValue());
	}

	static void _throwing(String k, Object o) {
		if (o instanceof Exception) {
			try {
				throw ((Exception) o);
			} catch (Exception e) {
			}
		} else {
			throw new KVException(k, o);
		}
	}
	
	public static void main(String[] args) {
		BigDecimal multiply = new BigDecimal(String.valueOf(8.66D)).multiply(new BigDecimal(500));
		System.out.println("ddd:" + multiply);
	}
}
